/*
 * @Author: 'zhangkeqq' '2211709169@qq.com'
 * @Date: 2025-07-24 13:04:26
 * @LastEditors: 'zhangkeqq' '2211709169@qq.com'
 * @LastEditTime: 2025-08-02 09:47:54
 * @FilePath: \vue3-admin-node\node-express\router\login.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
/*
 * @Author: 'zhangkeqq' '2211709169@qq.com'
 * @Date: 2025-07-24 13:04:26
 * @LastEditors: 'zhangkeqq' '2211709169@qq.com'
 * @LastEditTime: 2025-07-24 13:07:03
 * @FilePath: \node-express\router\login.js
 * @Description: 登录注册模块
 */
//登录注册模块
//导入express模块
const express = require('express')
const Joi = require('joi')
//导入expressJoi
const expressJoi = require('@escook/express-joi')
//使用express创建路由
const router = express.Router()
//导入login的路由处理模块
const loginHander = require('../router_handle/login')

//导入验证规则
const {login_limit} = require('../limit/login')
router.post('/register',expressJoi(login_limit),loginHander.register)

router.post('/login',expressJoi(login_limit),loginHander.login)
// returnMenuList
router.post('/returnMenuList',loginHander.returnMenuList)
//对外暴露路由
module.exports = router